package study.saas.order.entity;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import study.saas.common.viewmodel.BaseObject;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;


/**
 * @author zxx
 */
@Data
@Entity
@Table(name = "commodity",indexes = {
        @Index(name = "commodityName_index",columnList = "commodityName")
})
public class Commodity extends BaseObject {
    @ApiModelProperty(value = "商品数量")
    @Column
    private Integer amount;

    @ApiModelProperty(value = "商品名称")
    @Column(length = 64)
    private String commodityName;

    @ApiModelProperty(value = "商品价格")
    @Column
    private BigDecimal price;


}
